﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using Newtonsoft.Json;

namespace ifunction.BaiduBCS.SDK
{
    /// <summary>
    /// Class StorageObjectIdentity.
    /// </summary>
    [DataContract]
    public class StorageObjectIdentity : IBucketObject
    {
        /// <summary>
        /// Gets or sets the name of the bucket.
        /// </summary>
        /// <value>The name of the bucket.</value>
        [DataMember(Name = "bucket")]
        public string BucketName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the object.
        /// </summary>
        /// <value>The name of the object.</value>
        [DataMember(Name = "object")]
        public string ObjectName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is super file.
        /// </summary>
        /// <value><c>true</c> if this instance is super file; otherwise, <c>false</c>.</value>
        [DataMember(Name = "superfile")]
        [JsonConverter(typeof(BooleanConverter))]
        public bool IsSuperFile
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the MD5
        /// </summary>
        /// <value>The MD5.</value>
        [DataMember]
        public string MD5 { get; set; }
    }
}
